//
//  CoreGraphicsBZExt.h
//  BZFoundation
//
//  Created by 郭艺伟 on 2017/9/30.
//  Copyright © 2017年 郭艺伟. All rights reserved.
//

#if TARGET_OS_IOS
#ifndef MUPFoundation_CoreGraphicsBZExt_h
#define MUPFoundation_CoreGraphicsBZExt_h

/**
 *    使用指定的边距来缩放一个rectangle大小
 */
CG_INLINE CGRect bz_CGRectEdgeInset(CGRect rect, UIEdgeInsets insets) {
    return CGRectMake(CGRectGetMinX(rect)+insets.left, CGRectGetMinY(rect)+insets.top, CGRectGetWidth(rect)-insets.left-insets.right, CGRectGetHeight(rect)-insets.top-insets.bottom);
}

#endif
#endif /* CoreGraphicsBZExt_h */
